﻿<Window x:Class="CodeAbility.MonitorAndCommand.WpfMonitor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converters="clr-namespace:CodeAbility.MonitorAndCommand.WpfMonitor.Converters"
        xmlns:usercontrols="clr-namespace:CodeAbility.MonitorAndCommand.WpfMonitor.UserControls"
        Title="Monitor" Height="320" Width="1000"
        Loaded="Window_Loaded" Closing="Window_Closing" Closed="Window_Closed">
        
    <Window.Resources>
        <converters:ConnectedToStringConverter x:Key="ConnectedToString"/>
    </Window.Resources>
    
    <Grid Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="3*"/>
                <!--<ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="3*"/>-->
            </Grid.ColumnDefinitions>
        
            <!--<usercontrols:DS18B20 Grid.Column="0" DataContext="{Binding DS18B20ViewModel}"></usercontrols:DS18B20>
            <usercontrols:Pibrella Grid.Column="1" DataContext="{Binding PibrellaViewModel}"></usercontrols:Pibrella>
            <usercontrols:LEDs Grid.Column="2" DataContext="{Binding LEDsViewModel}"></usercontrols:LEDs>
            <usercontrols:DataGenerator Grid.Column="3" DataContext="{Binding DataGeneratorViewModel}"></usercontrols:DataGenerator>-->

            <usercontrols:MCP4921 Grid.Column="0" DataContext="{Binding MCP4921ViewModel}"></usercontrols:MCP4921>
        </Grid>

        <StatusBar Grid.Row="1" Background="Transparent" Height="35">
            <StackPanel Orientation="Horizontal">
                <Button x:Name="ConnectButton" 
                        Margin="5"
                        Content="{Binding Connected, Converter={StaticResource ConnectedToString}, FallbackValue=Connect}"                         
                        Click="ConnectButton_Click"></Button>
            </StackPanel>
        </StatusBar>

    </Grid>
</Window>
